package com.cskaoyan.javase.oop1._7exercise;

/**
 * 用面向对象的思想模拟LOL当中盖伦的战斗
 * 面向对象程序开发思想,以对象为核心开发程序
 *
 * 对象: 盖伦这个英雄
 * 类: 英雄类(Hero,Legend,Champion)
 * 类是抽取了全体对象属性和行为上的共性
 *
 * @since 11:18
 * @author wuguidong@cskaoyan.onaliyun.com
 */
public class Demo {
    public static void main(String[] args) {
        Champion galen = new Champion(18, "德玛西亚之力-盖伦", 8000, 0, "沉默", "开个盾", "爱的魔力转圈圈", "大宝剑", "人在塔在!");

        galen.fight();
    }
}

// 英雄类
class Champion {
    // 成员变量
    int level;
    String name;
    int hp;
    int mp;
    String skillQ;
    String skillW;
    String skillE;
    String skillR;
    // 标语
    String slogan;

    // 构造器
    public Champion(int level, String name, int hp, int mp, String skillQ, String skillW, String skillE, String skillR, String slogan) {
        this.level = level;
        this.name = name;
        this.hp = hp;
        this.mp = mp;
        this.skillQ = skillQ;
        this.skillW = skillW;
        this.skillE = skillE;
        this.skillR = skillR;
        this.slogan = slogan;
    }

    // 成员方法
    public void fight() {
        System.out.println(name + "正在和敌人战斗,他的口号" + slogan);
    }

}